loadUrlAndWait

abstract fun loadUrlAndWait(url: String)

Loads the resource identified by the given url and blocks the current thread execution until the main frame of the resource is loaded completely or the defaultTimeout is reached.

Parameters

url

the URL of the resource to load

Throws

when the url is empty or blank

when the resource hasn't been loaded within the defaultTimeout

when the navigation failed

when the browser is already closed


abstract fun loadUrlAndWait(params: LoadUrlParams)

Loads the resource identified by the given params and blocks the current thread execution until the main frame of the resource is loaded completely or the defaultTimeout is reached.

Parameters

params

parameters such as URL, POST data, and HTTP headers

Throws

when the resource hasn't been loaded within the defaultTimeout

when the navigation failed

when the browser is already closed


abstract fun loadUrlAndWait(url: String, timeout: Duration)

Loads the resource identified by the given url and blocks the current thread execution until the main frame of the resource is loaded completely or the given timeout is reached.

Since

7.9

Parameters

url

the URL of the resource to load

timeout

the maximum time to wait for the navigation to complete

Throws

when the timeout is 0 or negative

when the resource hasn't been loaded within a timeout

when the navigation failed

when the browser is already closed


abstract fun loadUrlAndWait(params: LoadUrlParams, timeout: Duration)

Loads a resource identified by the given params and blocks the current thread execution until the main frame of the resource is loaded completely or the given timeout is reached.

Since

7.9

Parameters

params

parameters such as URL, POST data and HTTP headers

timeout

the maximum time to wait for the navigation to complete

Throws

when timeout is 0 or negative

when the resource hasn't been loaded within a timeout

when the navigation failed

when the browser is already closed